package com.lagou.edu.controller;

import com.lagou.edu.service.IEmailServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Classname EmailController
 * @Date 2021/5/30 17:52
 * @Author ch'ien
 */
@RestController
public class EmailController {

    @Autowired
    private IEmailServer emailServer;

    @GetMapping("/email/{email}/{code}")
    public Boolean send(@PathVariable String email, @PathVariable String code){
        return emailServer.send(email, code);
    }
}
